package com.itheima.mystream;

import java.util.ArrayList;
import java.util.stream.Stream;

public class Test02 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("西施");
        list.add("昭君");
        list.add("貂蝉");
        list.add("玉环");
        list.add("如花");
        list.add("娇花");
        list.add("羞花");
        Stream<String> stream = list.stream();
        stream.filter(s->s.contains("花")).limit(2).skip(1).forEach(s-> System.out.println(s));

    }
}
